from cup import log
from conf import settings


def logger(log_name):
    log_file = "%s/log/%s" % (settings.BASE_DIR, settings.LOG_TYPES[log_name])
    log.init_comlog(
        log_name,
        log.DEBUG,
        log_file,
        log.ROTATION,
        4*1024*1024,
        False)

    return log
